#ifndef Network_h
#define Network_h

#include "neuron.h"

class Network;

class Layer{
	friend class Network;

public :
	Layer(int neuron_Number);
	~Layer();

	int get_Neurons_Number();
	Neuron *get_Neuron(int i);

private:
	int neurons_Number;
	vector<Neuron *> neurons;
};

class Network{

public:
	Network(int layers_Number, int *neurons_Per_Layer);
	~Network();

	void init(int func);
	void randomize();

	bool train(const double *in_Vect, double *out_Vect, const double *desired_Out_Vect, double error = 0.01);
	void run(const double *in_Vect, double *out_Vect);

	int set_Alpha(double alpha);
	int set_Lambda(double lambda);	

	int get_Layers_Number();
	Layer get_Layer(int i);

private:
	int layers_Number;
	vector<Layer *> layers;

	double lambda;
	double alpha;

	void backprop(const double *desired_Out_Vect);
	void output(double *out_Vect);
};

#endif 
